# My/SymbolExporter.pm

package My::SymbolExporter; 

use strict;

BEGIN {
   use vars '@SYMBOLS';
   # temporary local configuration - we could read from a file too
   my %conf = (
      e => 'mc2',
      time => 'money',
      party => 'a good time',
   );

   sub initialize {
      no strict 'refs';
      foreach (keys %conf) {
         # define variable with typeglob
         *{__PACKAGE__.'::'.$_} = \$conf{$_};
         
         # add variable (with leading '$') to export list
         push @SYMBOLS, "\$$_";
      }
      return 1;
   }

   return undef unless initialize;
}

use Exporter;
our @ISA = qw(Exporter);
our @EXPORT = ('@SYMBOLS',@SYMBOLS);